package lab02.Test21;

public class Test {
    public static void main(String[] args) {
        char a='0';
        String string="12345678901234567890000";
        System.out.println(getCharCount(a,string));
    }

    public static int getCharCount(char a,String string){
        int count=0;
        for(int i=0;i<string.length();i++){
            char temp =string.charAt(i);
            if(a==temp)
                count++;
        }
       return count;
    }
}
